﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Whoever.Health.Business.Entities;

namespace Whoever.Health.Website.Infrastructure
{
    public static class SessionState
    {
        public static User LoggedInUser
        {
            get
            {
                return (User)HttpContext.Current.Session["LoggedInUser"];
            }
            set
            {
                if (value == null || value is User)
                    HttpContext.Current.Session["LoggedInUser"] = value;
                else
                    throw new Exception("Internal - LoggedInUser wrong Type");
            }
        }
    }
}